@extends('layouts.app')
@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="panel panel-default">
                    <div class="panel-heading">新增Page</div>
                    <div class="panel-body">
                        @if(count($errors )>0)
                            <div class="alert alert-danger">
                                <strong>Whoops!</strong>There were some problems with your input. <br><br>
                                <ul>
                                    @foreach($errors->all() as $error)
                                        <li>{{$error}}</li>
                                        @endforeach
                                </ul>
                            </div>
                            @endif
                            <form action="{{URL('admin/pages')}}" method="post">
                                <input type="hidden" name="_token" value="{{csrf_token()}}">
                                <input type="text" name="title" class="form-control" required="required"><br>
                                <textarea name="body" class="form-control" rows="10" required="required"></textarea><br>
                                <button class="btn btn-lg btn-info">新增Page</button>
                            </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @endsection